<template>
  <div>
    <h1 @click="aaa($event)">自定义事件</h1>
    <SubComp @xxx="aaa($event)"></SubComp>
    <h1>{{ evt }}</h1>

    <BaseCheckbox :checked="boo" @input="bbb($event)"></BaseCheckbox>
  </div>
</template>

<script>
//VUE选项
import SubComp from "@/components/test/SubComp.vue";
import BaseCheckbox from "@/components/test/base-checkbox.vue";

export default {
  name: "HomeComp3",
  components: { BaseCheckbox, SubComp },
  data() {
    return {
      evt: {},
      boo: false,
    };
  },
  methods: {
    aaa(evt) {
      alert(evt);
    },

    bbb(ckd) {
      console.log(ckd);
      this.boo = ckd;
    },
  },
};
</script>

<style scoped></style>
